home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / Script.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  40.4 KB  |  1,068 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Script.h
  3.  
  4.      Contains:    Script Manager interfaces
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1986-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __SCRIPT__
  19. #define __SCRIPT__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __QUICKDRAW__
  25. #include <Quickdraw.h>
  26. #endif
  27. #ifndef __INTLRESOURCES__
  28. #include <IntlResources.h>
  29. #endif
  30. #ifndef __EVENTS__
  31. #include <Events.h>
  32. #endif
  33.  
  34.  
  35.  
  36. #if PRAGMA_ONCE
  37. #pragma once
  38. #endif
  39.  
  40. #ifdef __cplusplus
  41. extern "C" {
  42. #endif
  43.  
  44. #if PRAGMA_IMPORT
  45. #pragma import on
  46. #endif
  47.  
  48. #if PRAGMA_STRUCT_ALIGN
  49.     #pragma options align=mac68k
  50. #elif PRAGMA_STRUCT_PACKPUSH
  51.     #pragma pack(push, 2)
  52. #elif PRAGMA_STRUCT_PACK
  53.     #pragma pack(2)
  54. #endif
  55.  
  56.  
  57. enum {
  58.                                                                 /* Script System constants */
  59.     smSystemScript                = -1,                            /*designates system script.*/
  60.     smCurrentScript                = -2,                            /*designates current font script.*/
  61.     smAllScripts                = -3                            /*designates any script    */
  62. };
  63.  
  64.  
  65. enum {
  66.     smRoman                        = 0,                            /*Roman*/
  67.     smJapanese                    = 1,                            /*Japanese*/
  68.     smTradChinese                = 2,                            /*Traditional Chinese*/
  69.     smKorean                    = 3,                            /*Korean*/
  70.     smArabic                    = 4,                            /*Arabic*/
  71.     smHebrew                    = 5,                            /*Hebrew*/
  72.     smGreek                        = 6,                            /*Greek*/
  73.     smCyrillic                    = 7,                            /*Cyrillic*/
  74.     smRSymbol                    = 8,                            /*Right-left symbol*/
  75.     smDevanagari                = 9,                            /*Devanagari*/
  76.     smGurmukhi                    = 10,                            /*Gurmukhi*/
  77.     smGujarati                    = 11,                            /*Gujarati*/
  78.     smOriya                        = 12,                            /*Oriya*/
  79.     smBengali                    = 13,                            /*Bengali*/
  80.     smTamil                        = 14,                            /*Tamil*/
  81.     smTelugu                    = 15,                            /*Telugu*/
  82.     smKannada                    = 16,                            /*Kannada/Kanarese*/
  83.     smMalayalam                    = 17                            /*Malayalam*/
  84. };
  85.  
  86.  
  87. enum {
  88.     smSinhalese                    = 18,                            /*Sinhalese*/
  89.     smBurmese                    = 19,                            /*Burmese*/
  90.     smKhmer                        = 20,                            /*Khmer/Cambodian*/
  91.     smThai                        = 21,                            /*Thai*/
  92.     smLaotian                    = 22,                            /*Laotian*/
  93.     smGeorgian                    = 23,                            /*Georgian*/
  94.     smArmenian                    = 24,                            /*Armenian*/
  95.     smSimpChinese                = 25,                            /*Simplified Chinese*/
  96.     smTibetan                    = 26,                            /*Tibetan*/
  97.     smMongolian                    = 27,                            /*Mongolian*/
  98.     smGeez                        = 28,                            /*Geez/Ethiopic*/
  99.     smEthiopic                    = 28,                            /*Synonym for smGeez*/
  100.     smEastEurRoman                = 29,                            /*Synonym for smSlavic*/
  101.     smCentralEuroRoman            = smEastEurRoman,                /* another synonym */
  102.     smVietnamese                = 30,                            /*Vietnamese*/
  103.     smExtArabic                    = 31,                            /*extended Arabic*/
  104.     smUninterp                    = 32,                            /*uninterpreted symbols, e.g. palette symbols*/
  105.     smKlingon                    = 32,                            /*Klingon*/
  106.                                                                 /*Obsolete names for script systems (kept for backward compatibility)*/
  107.     smChinese                    = 2,                            /*(use smTradChinese or smSimpChinese)*/
  108.     smRussian                    = 7,                            /*(old name for smCyrillic)*/
  109.                                                                 /* smMaldivian = 25;         (no more smMaldivian!)*/
  110.     smAmharic                    = 28,                            /*(old name for smGeez)*/
  111.     smSlavic                    = 29,                            /*(old name for smEastEurRoman)*/
  112.     smSindhi                    = 31                            /*(old name for smExtArabic)*/
  113. };
  114.  
  115.  
  116. enum {
  117.                                                                 /* Language Codes */
  118.     langEnglish                    = 0,                            /* smRoman script */
  119.     langFrench                    = 1,                            /* smRoman script */
  120.     langGerman                    = 2,                            /* smRoman script */
  121.     langItalian                    = 3,                            /* smRoman script */
  122.     langDutch                    = 4,                            /* smRoman script */
  123.     langSwedish                    = 5,                            /* smRoman script */
  124.     langSpanish                    = 6,                            /* smRoman script */
  125.     langDanish                    = 7,                            /* smRoman script */
  126.     langPortuguese                = 8,                            /* smRoman script */
  127.     langNorwegian                = 9,                            /* smRoman script */
  128.     langHebrew                    = 10,                            /* smHebrew script */
  129.     langJapanese                = 11,                            /* smJapanese script */
  130.     langArabic                    = 12,                            /* smArabic script */
  131.     langFinnish                    = 13,                            /* smRoman script */
  132.     langGreek                    = 14,                            /* should be smGreek script; current systems actually use smRoman (11/95) */
  133.     langIcelandic                = 15,                            /* variant smRoman script */
  134.     langMaltese                    = 16,                            /* variant smRoman script */
  135.     langTurkish                    = 17,                            /* variant smRoman script */
  136.     langCroatian                = 18,                            /* Serbo-Croatian in variant Roman script */
  137.     langTradChinese                = 19                            /* Chinese in traditional characters */
  138. };
  139.  
  140.  
  141. enum {
  142.     langUrdu                    = 20,                            /* smArabic script */
  143.     langHindi                    = 21,                            /* smDevanagari script */
  144.     langThai                    = 22,                            /* smThai script */
  145.     langKorean                    = 23,                            /* smKorean script */
  146.     langLithuanian                = 24,                            /* smCentralEuroRoman script */
  147.     langPolish                    = 25,                            /* smCentralEuroRoman script */
  148.     langHungarian                = 26,                            /* smCentralEuroRoman script */
  149.     langEstonian                = 27,                            /* smCentralEuroRoman script */
  150.     langLettish                    = 28,                            /* smCentralEuroRoman script */
  151.     langLatvian                    = 28,                            /* Synonym for langLettish */
  152.     langSaamisk                    = 29,                            /* lang. of the Sami/Lapp people of Scand. (11/95, no current script supports this) */
  153.     langFaeroese                = 30,                            /* smRoman script */
  154.     langFarsi                    = 31,                            /* smArabic script */
  155.     langPersian                    = 31,                            /* Synonym for langFarsi */
  156.     langRussian                    = 32,                            /* smCyrillic script */
  157.     langSimpChinese                = 33,                            /* Chinese in simplified characters */
  158.     langFlemish                    = 34,                            /* smRoman script */
  159.     langIrish                    = 35,                            /* smRoman script */
  160.     langAlbanian                = 36                            /* smRoman script */
  161. };
  162.  
  163.  
  164. enum {
  165.     langRomanian                = 37,                            /* variant smRoman script (11/95) <22> */
  166.     langCzech                    = 38,                            /* smCentralEuroRoman script */
  167.     langSlovak                    = 39,                            /* smCentralEuroRoman script */
  168.     langSlovenian                = 40,                            /* uses Croatian variant of smRoman script (11/95) <22> */
  169.     langYiddish                    = 41,                            /* smHebrew script */
  170.     langSerbian                    = 42,                            /* Serbo-Croatian in smCyrillic script */
  171.     langMacedonian                = 43,                            /* smCyrillic script */
  172.     langBulgarian                = 44,                            /* variant smCyrillic script (11/95) <22> */
  173.     langUkrainian                = 45,                            /* variant smCyrillic script (11/95) <22> */
  174.     langByelorussian            = 46,                            /* smCyrillic script */
  175.     langUzbek                    = 47,                            /* variant smCyrillic script (11/95) <22> */
  176.     langKazakh                    = 48,                            /* variant smCyrillic script (11/95) <22> */
  177.     langAzerbaijani                = 49,                            /* Azerbaijani in variant smCyrillic script (11/95) <22> */
  178.     langAzerbaijanAr            = 50,                            /* Azerbaijani in smArabic script (Iran) */
  179.     langArmenian                = 51,                            /* smArmenian script */
  180.     langGeorgian                = 52,                            /* smGeorgian script */
  181.     langMoldavian                = 53,                            /* smCyrillic script */
  182.     langKirghiz                    = 54,                            /* variant smCyrillic script (11/95) <22> */
  183.     langTajiki                    = 55,                            /* variant smCyrillic script (11/95) <22> */
  184.     langTurkmen                    = 56                            /* variant smCyrillic script (11/95) <22> */
  185. };
  186.  
  187.  
  188. enum {
  189.     langMongolian                = 57,                            /* Mongolian in smMongolian script */
  190.     langMongolianCyr            = 58,                            /* Mongolian in variant smCyrillic script (11/95) <22> */
  191.     langPashto                    = 59,                            /* smExtArabic script (11/95) <22> */
  192.     langKurdish                    = 60,                            /* smArabic script */
  193.     langKashmiri                = 61,                            /* smExtArabic script (11/95) <22> */
  194.     langSindhi                    = 62,                            /* smExtArabic script (11/95) <22> */
  195.     langTibetan                    = 63,                            /* smTibetan script */
  196.     langNepali                    = 64,                            /* smDevanagari script */
  197.     langSanskrit                = 65,                            /* smDevanagari script */
  198.     langMarathi                    = 66,                            /* smDevanagari script */
  199.     langBengali                    = 67,                            /* smBengali script */
  200.     langAssamese                = 68,                            /* smBengali script */
  201.     langGujarati                = 69,                            /* smGujarati script */
  202.     langPunjabi                    = 70,                            /* smGurmukhi script */
  203.     langOriya                    = 71,                            /* smOriya script */
  204.     langMalayalam                = 72,                            /* smMalayalam script */
  205.     langKannada                    = 73,                            /* smKannada script */
  206.     langTamil                    = 74,                            /* smTamil script */
  207.     langTelugu                    = 75,                            /* smTelugu script */
  208.     langSinhalese                = 76                            /* smSinhalese script */
  209. };
  210.  
  211.  
  212. enum {
  213.     langBurmese                    = 77,                            /* smBurmese script */
  214.     langKhmer                    = 78,                            /* smKhmer script */
  215.     langLao                        = 79,                            /* smLaotian script */
  216.     langVietnamese                = 80,                            /* smVietnamese script */
  217.     langIndonesian                = 81,                            /* smRoman script */
  218.     langTagalog                    = 82,                            /* smRoman script */
  219.     langMalayRoman                = 83,                            /* Malay in smRoman script */
  220.     langMalayArabic                = 84,                            /* Malay in smArabic script */
  221.     langAmharic                    = 85,                            /* smEthiopic script */
  222.     langTigrinya                = 86,                            /* smEthiopic script */
  223.     langGalla                    = 87,                            /* smEthiopic script */
  224.     langOromo                    = 87,                            /* Synonym for langGalla */
  225.     langSomali                    = 88,                            /* smRoman script */
  226.     langSwahili                    = 89,                            /* smRoman script */
  227.     langKinyarwanda                = 90,                            /* smRoman script */
  228.     langRuanda                    = 90,                            /* synonym for langKinyarwanda */
  229.     langRundi                    = 91,                            /* smRoman script */
  230.     langNyanja                    = 92,                            /* smRoman script */
  231.     langChewa                    = 92,                            /* synonym for langNyanja */
  232.     langMalagasy                = 93,                            /* smRoman script */
  233.     langEsperanto                = 94,                            /* extended Roman script */
  234.     langWelsh                    = 128                            /* smRoman script */
  235. };
  236.  
  237.  
  238. enum {
  239.     langBasque                    = 129,                            /* smRoman script */
  240.     langCatalan                    = 130,                            /* smRoman script */
  241.     langLatin                    = 131,                            /* smRoman script */
  242.     langQuechua                    = 132,                            /* smRoman script */
  243.     langGuarani                    = 133,                            /* smRoman script */
  244.     langAymara                    = 134,                            /* smRoman script */
  245.     langTatar                    = 135,                            /* smCyrillic script */
  246.     langUighur                    = 136,                            /* smArabic script */
  247.     langDzongkha                = 137,                            /* (lang of Bhutan) smTibetan script */
  248.     langJavaneseRom                = 138,                            /* Javanese in smRoman script */
  249.     langSundaneseRom            = 139,                            /* Sundanese in smRoman script */
  250.     langGalician                = 140,                            /* smRoman script */
  251.     langAfricaans                = 141,                            /* smRoman script */
  252.                                                                 /* Obsolete names, kept for backward compatibility */
  253.     langPortugese                = 8,                            /* old misspelled version, kept for compatibility */
  254.     langMalta                    = 16,                            /* old misspelled version, kept for compatibility */
  255.     langYugoslavian                = 18,                            /* (use langCroatian, langSerbian, etc.) */
  256.     langChinese                    = 19,                            /* (use langTradChinese or langSimpChinese) */
  257.     langLapponian                = 29,                            /* Synonym for langSaamisk, not correct name */
  258.     langLappish                    = 29                            /* Synonym for langSaamisk */
  259. };
  260.  
  261.  
  262. enum {
  263.                                                                 /* Regional version codes */
  264.     verUS                        = 0,
  265.     verFrance                    = 1,
  266.     verBritain                    = 2,
  267.     verGermany                    = 3,
  268.     verItaly                    = 4,
  269.     verNetherlands                = 5,
  270.     verFrBelgiumLux                = 6,                            /* French for Belgium & Luxembourg */
  271.     verSweden                    = 7,
  272.     verSpain                    = 8,
  273.     verDenmark                    = 9,
  274.     verPortugal                    = 10,
  275.     verFrCanada                    = 11,
  276.     verNorway                    = 12
  277. };
  278.  
  279.  
  280. enum {
  281.     verIsrael                    = 13,
  282.     verJapan                    = 14,
  283.     verAustralia                = 15,
  284.     verArabic                    = 16,                            /* synonym for verArabia */
  285.     verFinland                    = 17,
  286.     verFrSwiss                    = 18,                            /* French Swiss */
  287.     verGrSwiss                    = 19,                            /* German Swiss */
  288.     verGreece                    = 20,
  289.     verIceland                    = 21,
  290.     verMalta                    = 22,
  291.     verCyprus                    = 23,
  292.     verTurkey                    = 24,
  293.     verYugoCroatian                = 25,                            /* Croatian system for Yugoslavia */
  294.     verNetherlandsComma            = 26,
  295.     verBelgiumLuxPoint            = 27,
  296.     verCanadaComma                = 28,
  297.     verCanadaPoint                = 29,
  298.     vervariantPortugal            = 30,
  299.     vervariantNorway            = 31,
  300.     vervariantDenmark            = 32,
  301.     verIndiaHindi                = 33,                            /* Hindi system for India */
  302.     verPakistan                    = 34,
  303.     verTurkishModified            = 35,
  304.     verItalianSwiss                = 36,
  305.     verRomania                    = 39,
  306.     verGreekAncient                = 40,
  307.     verLithuania                = 41,
  308.     verPoland                    = 42,
  309.     verHungary                    = 43,
  310.     verEstonia                    = 44,
  311.     verLatvia                    = 45
  312. };
  313.  
  314.  
  315. enum {
  316.     verLapland                    = 46,
  317.     verFaeroeIsl                = 47,
  318.     verIran                        = 48,
  319.     verRussia                    = 49,
  320.     verIreland                    = 50,                            /* English-language version for Ireland */
  321.     verKorea                    = 51,
  322.     verChina                    = 52,
  323.     verTaiwan                    = 53,
  324.     verThailand                    = 54,
  325.     verCzech                    = 56,
  326.     verSlovak                    = 57,
  327.     verGenericFE                = 58,
  328.     verMagyar                    = 59,
  329.     verBengali                    = 60,
  330.     verByeloRussian                = 61,
  331.     verUkrania                    = 62,
  332.     verUkraine                    = 62,
  333.     verAlternateGr                = 64,
  334.     verCroatia                    = 68,
  335.     verBrazil                    = 71,
  336.     verBulgaria                    = 72,
  337.     verCatalonia                = 73
  338. };
  339.  
  340.  
  341. enum {
  342.     minCountry                    = verUS,
  343.     maxCountry                    = verCatalonia                    /* changed from verCroatia when additional enums added */
  344. };
  345.  
  346. /* Obsolete region code names, kept for backward compatibility */
  347.  
  348. enum {
  349.     verBelgiumLux                = 6,                            /* (use verFrBelgiumLux instead, less ambiguous) */
  350.     verArabia                    = 16,
  351.     verYugoslavia                = 25,                            /* (use verYugoCroatian instead, less ambiguous) */
  352.     verIndia                    = 33                            /* (use verIndiaHindi instead, less ambiguous) */
  353. };
  354.  
  355.  
  356. enum {
  357.                                                                 /* Calendar Codes */
  358.     calGregorian                = 0,
  359.     calArabicCivil                = 1,
  360.     calArabicLunar                = 2,
  361.     calJapanese                    = 3,
  362.     calJewish                    = 4,
  363.     calCoptic                    = 5,
  364.     calPersian                    = 6
  365. };
  366.  
  367.  
  368. enum {
  369.                                                                 /* Integer Format Codes */
  370.     intWestern                    = 0,
  371.     intArabic                    = 1,
  372.     intRoman                    = 2,
  373.     intJapanese                    = 3,
  374.     intEuropean                    = 4,
  375.     intOutputMask                = 0x8000
  376. };
  377.  
  378.  
  379. enum {
  380.                                                                 /* CharByte byte types */
  381.     smSingleByte                = 0,
  382.     smFirstByte                    = -1,
  383.     smLastByte                    = 1,
  384.     smMiddleByte                = 2
  385. };
  386.  
  387.  
  388. enum {
  389.                                                                 /* CharType field masks */
  390.     smcTypeMask                    = 0x000F,
  391.     smcReserved                    = 0x00F0,
  392.     smcClassMask                = 0x0F00,
  393.     smcOrientationMask            = 0x1000,                        /*two-byte script glyph orientation*/
  394.     smcRightMask                = 0x2000,
  395.     smcUpperMask                = 0x4000,
  396.     smcDoubleMask                = 0x8000
  397. };
  398.  
  399.  
  400. enum {
  401.                                                                 /* Basic CharType character types */
  402.     smCharPunct                    = 0x0000,
  403.     smCharAscii                    = 0x0001,
  404.     smCharEuro                    = 0x0007,
  405.     smCharExtAscii                = 0x0007,                        /* More correct synonym for smCharEuro */
  406.                                                                 /* Additional CharType character types for script systems */
  407.     smCharKatakana                = 0x0002,                        /*Japanese Katakana*/
  408.     smCharHiragana                = 0x0003,                        /*Japanese Hiragana*/
  409.     smCharIdeographic            = 0x0004,                        /*Hanzi, Kanji, Hanja*/
  410.     smCharTwoByteGreek            = 0x0005,                        /*2-byte Greek in Far East systems*/
  411.     smCharTwoByteRussian        = 0x0006,                        /*2-byte Cyrillic in Far East systems*/
  412.     smCharBidirect                = 0x0008,                        /*Arabic/Hebrew*/
  413.     smCharContextualLR            = 0x0009,                        /*Contextual left-right: Thai, Indic scripts*/
  414.     smCharNonContextualLR        = 0x000A,                        /*Non-contextual left-right: Cyrillic, Greek*/
  415.     smCharHangul                = 0x000C,                        /*Korean Hangul*/
  416.     smCharJamo                    = 0x000D,                        /*Korean Jamo*/
  417.     smCharBopomofo                = 0x000E,                        /*Chinese Bopomofo*/
  418.     smCharGanaKana                = 0x000F,                        /*Shared for Japanese Hiragana & Katakana*/
  419.                                                                 /* old names for some of above, for backward compatibility */
  420.     smCharFISKana                = 0x0002,                        /*Katakana*/
  421.     smCharFISGana                = 0x0003,                        /*Hiragana*/
  422.     smCharFISIdeo                = 0x0004                        /*Hanzi, Kanji, Hanja*/
  423. };
  424.  
  425.  
  426. enum {
  427.     smCharFISGreek                = 0x0005,                        /*2-byte Greek in Far East systems*/
  428.     smCharFISRussian            = 0x0006,                        /*2-byte Cyrillic in Far East systems*/
  429.                                                                 /* CharType classes for punctuation (smCharPunct) */
  430.     smPunctNormal                = 0x0000,
  431.     smPunctNumber                = 0x0100,
  432.     smPunctSymbol                = 0x0200,
  433.     smPunctBlank                = 0x0300,                        /* Additional CharType classes for punctuation in two-byte systems */
  434.     smPunctRepeat                = 0x0400,                        /* repeat marker */
  435.     smPunctGraphic                = 0x0500,                        /* line graphics */
  436.                                                                 /* CharType Katakana and Hiragana classes for two-byte systems */
  437.     smKanaSmall                    = 0x0100,                        /*small kana character*/
  438.     smKanaHardOK                = 0x0200,                        /*can have dakuten*/
  439.     smKanaSoftOK                = 0x0300,                        /*can have dakuten or han-dakuten*/
  440.                                                                 /* CharType Ideographic classes for two-byte systems */
  441.     smIdeographicLevel1            = 0x0000,                        /*level 1 char*/
  442.     smIdeographicLevel2            = 0x0100,                        /*level 2 char*/
  443.     smIdeographicUser            = 0x0200,                        /*user char*/
  444.                                                                 /* old names for above, for backward compatibility */
  445.     smFISClassLvl1                = 0x0000,                        /*level 1 char*/
  446.     smFISClassLvl2                = 0x0100,                        /*level 2 char*/
  447.     smFISClassUser                = 0x0200,                        /*user char*/
  448.                                                                 /* CharType Jamo classes for Korean systems */
  449.     smJamoJaeum                    = 0x0000,                        /*simple consonant char*/
  450.     smJamoBogJaeum                = 0x0100,                        /*complex consonant char*/
  451.     smJamoMoeum                    = 0x0200,                        /*simple vowel char*/
  452.     smJamoBogMoeum                = 0x0300                        /*complex vowel char*/
  453. };
  454.  
  455.  
  456. enum {
  457.                                                                 /* CharType glyph orientation for two-byte systems */
  458.     smCharHorizontal            = 0x0000,                        /* horizontal character form, or for both */
  459.     smCharVertical                = 0x1000,                        /* vertical character form */
  460.                                                                 /* CharType directions */
  461.     smCharLeft                    = 0x0000,
  462.     smCharRight                    = 0x2000,                        /* CharType case modifers */
  463.     smCharLower                    = 0x0000,
  464.     smCharUpper                    = 0x4000,                        /* CharType character size modifiers (1 or multiple bytes). */
  465.     smChar1byte                    = 0x0000,
  466.     smChar2byte                    = 0x8000
  467. };
  468.  
  469.  
  470. enum {
  471.                                                                 /* TransliterateText target types for Roman */
  472.     smTransAscii                = 0,                            /*convert to ASCII*/
  473.     smTransNative                = 1,                            /*convert to font script*/
  474.     smTransCase                    = 0xFE,                            /*convert case for all text*/
  475.     smTransSystem                = 0xFF,                            /*convert to system script*/
  476.                                                                 /* TransliterateText target types for two-byte scripts */
  477.     smTransAscii1                = 2,                            /*1-byte Roman*/
  478.     smTransAscii2                = 3,                            /*2-byte Roman*/
  479.     smTransKana1                = 4,                            /*1-byte Japanese Katakana*/
  480.     smTransKana2                = 5                                /*2-byte Japanese Katakana*/
  481. };
  482.  
  483.  
  484. enum {
  485.     smTransGana2                = 7,                            /*2-byte Japanese Hiragana (no 1-byte Hiragana)*/
  486.     smTransHangul2                = 8,                            /*2-byte Korean Hangul*/
  487.     smTransJamo2                = 9,                            /*2-byte Korean Jamo*/
  488.     smTransBopomofo2            = 10,                            /*2-byte Chinese Bopomofo*/
  489.                                                                 /* TransliterateText target modifiers */
  490.     smTransLower                = 0x4000,                        /*target becomes lowercase*/
  491.     smTransUpper                = 0x8000,                        /*target becomes uppercase*/
  492.                                                                 /* TransliterateText resource format numbers */
  493.     smTransRuleBaseFormat        = 1,                            /*Rule based trsl resource format */
  494.     smTransHangulFormat            = 2,                            /*Table based Hangul trsl resource format*/
  495.                                                                 /* TransliterateText property flags */
  496.     smTransPreDoubleByting        = 1,                            /*Convert all text to double byte before transliteration*/
  497.     smTransPreLowerCasing        = 2                                /*Convert all text to lower case before transliteration*/
  498. };
  499.  
  500.  
  501. enum {
  502.                                                                 /* TransliterateText source mask - general */
  503.     smMaskAll                    = (long)0xFFFFFFFF,                /*Convert all text*/
  504.                                                                 /* TransliterateText source masks */
  505.     smMaskAscii                    = 0x00000001,                    /*2^smTransAscii*/
  506.     smMaskNative                = 0x00000002,                    /*2^smTransNative*/
  507.                                                                 /* TransliterateText source masks for two-byte scripts */
  508.     smMaskAscii1                = 0x00000004,                    /*2^smTransAscii1*/
  509.     smMaskAscii2                = 0x00000008,                    /*2^smTransAscii2*/
  510.     smMaskKana1                    = 0x00000010,                    /*2^smTransKana1*/
  511.     smMaskKana2                    = 0x00000020,                    /*2^smTransKana2*/
  512.     smMaskGana2                    = 0x00000080,                    /*2^smTransGana2*/
  513.     smMaskHangul2                = 0x00000100,                    /*2^smTransHangul2*/
  514.     smMaskJamo2                    = 0x00000200,                    /*2^smTransJamo2*/
  515.     smMaskBopomofo2                = 0x00000400                    /*2^smTransBopomofo2*/
  516. };
  517.  
  518.  
  519. enum {
  520.                                                                 /* Result values from GetScriptManagerVariable and SetScriptManagerVariable calls. */
  521.     smNotInstalled                = 0,                            /*routine not available in script*/
  522.     smBadVerb                    = -1,                            /*Bad verb passed to a routine*/
  523.     smBadScript                    = -2                            /*Bad script code passed to a routine*/
  524. };
  525.  
  526.  
  527. enum {
  528.                                                                 /* Values for script redraw flag. */
  529.     smRedrawChar                = 0,                            /*Redraw character only*/
  530.     smRedrawWord                = 1,                            /*Redraw entire word (2-byte systems)*/
  531.     smRedrawLine                = -1                            /*Redraw entire line (bidirectional systems)*/
  532. };
  533.  
  534.  
  535. enum {
  536.                                                                 /* GetScriptManagerVariable and SetScriptManagerVariable verbs */
  537.     smVersion                    = 0,                            /*Script Manager version number*/
  538.     smMunged                    = 2,                            /*Globals change count*/
  539.     smEnabled                    = 4,                            /*Count of enabled scripts, incl Roman*/
  540.     smBidirect                    = 6,                            /*At least one bidirectional script*/
  541.     smFontForce                    = 8,                            /*Force font flag*/
  542.     smIntlForce                    = 10,                            /*Force intl flag*/
  543.     smForced                    = 12,                            /*Script was forced to system script*/
  544.     smDefault                    = 14,                            /*Script was defaulted to Roman script*/
  545.     smPrint                        = 16,                            /*Printer action routine*/
  546.     smSysScript                    = 18,                            /*System script*/
  547.     smLastScript                = 20,                            /*Last keyboard script*/
  548.     smKeyScript                    = 22,                            /*Keyboard script*/
  549.     smSysRef                    = 24,                            /*System folder refNum*/
  550.     smKeyCache                    = 26,                            /*obsolete*/
  551.     smKeySwap                    = 28,                            /*Swapping table handle*/
  552.     smGenFlags                    = 30,                            /*General flags long*/
  553.     smOverride                    = 32,                            /*Script override flags*/
  554.     smCharPortion                = 34,                            /*Ch vs SpExtra proportion*/
  555.                                                                 /* New for System 7.0: */
  556.     smDoubleByte                = 36,                            /*Flag for double-byte script installed*/
  557.     smKCHRCache                    = 38,                            /*Returns pointer to KCHR cache*/
  558.     smRegionCode                = 40,                            /*Returns current region code (verXxx)*/
  559.     smKeyDisableState            = 42                            /*Returns current keyboard disable state*/
  560. };
  561.  
  562.  
  563. enum {
  564.                                                                 /* GetScriptVariable and SetScriptVariable verbs. */
  565.                                                                 /* Note: Verbs private to script systems are negative, while */
  566.                                                                 /* those general across script systems are non-negative. */
  567.     smScriptVersion                = 0,                            /*Script software version*/
  568.     smScriptMunged                = 2,                            /*Script entry changed count*/
  569.     smScriptEnabled                = 4,                            /*Script enabled flag*/
  570.     smScriptRight                = 6,                            /*Right to left flag*/
  571.     smScriptJust                = 8,                            /*Justification flag*/
  572.     smScriptRedraw                = 10,                            /*Word redraw flag*/
  573.     smScriptSysFond                = 12,                            /*Preferred system font*/
  574.     smScriptAppFond                = 14,                            /*Preferred Application font*/
  575.     smScriptBundle                = 16,                            /*Beginning of itlb verbs*/
  576.     smScriptNumber                = 16,                            /*Script itl0 id*/
  577.     smScriptDate                = 18,                            /*Script itl1 id*/
  578.     smScriptSort                = 20,                            /*Script itl2 id*/
  579.     smScriptFlags                = 22,                            /*flags word*/
  580.     smScriptToken                = 24,                            /*Script itl4 id*/
  581.     smScriptEncoding            = 26,                            /*id of optional itl5, if present*/
  582.     smScriptLang                = 28                            /*Current language for script*/
  583. };
  584.  
  585.  
  586. enum {
  587.     smScriptNumDate                = 30,                            /*Script Number/Date formats.*/
  588.     smScriptKeys                = 32,                            /*Script KCHR id*/
  589.     smScriptIcon                = 34,                            /*ID # of SICN or kcs#/kcs4/kcs8 suite*/
  590.     smScriptPrint                = 36,                            /*Script printer action routine*/
  591.     smScriptTrap                = 38,                            /*Trap entry pointer*/
  592.     smScriptCreator                = 40,                            /*Script file creator*/
  593.     smScriptFile                = 42,                            /*Script file name*/
  594.     smScriptName                = 44,                            /*Script name*/
  595.                                                                 /* There is a hole here for old Kanji private verbs 46-76 */
  596.                                                                 /* New for System 7.0: */
  597.     smScriptMonoFondSize        = 78,                            /*default monospace FOND (hi) & size (lo)*/
  598.     smScriptPrefFondSize        = 80,                            /*preferred FOND (hi) & size (lo)*/
  599.     smScriptSmallFondSize        = 82,                            /*default small FOND (hi) & size (lo)*/
  600.     smScriptSysFondSize            = 84,                            /*default system FOND (hi) & size (lo)*/
  601.     smScriptAppFondSize            = 86,                            /*default app FOND (hi) & size (lo)*/
  602.     smScriptHelpFondSize        = 88,                            /*default Help Mgr FOND (hi) & size (lo)*/
  603.     smScriptValidStyles            = 90,                            /*mask of valid styles for script*/
  604.     smScriptAliasStyle            = 92                            /*style (set) to use for aliases*/
  605. };
  606.  
  607. /* special negative verbs for Get/SetScriptVariable that were associated with WorldScriptI */
  608. /* move them here to be public */
  609.  
  610. enum {
  611.                                                                 /* WorldScript private verbs */
  612.     smLayoutCache                = -309,                            /* HiWrd(param) is # entries, LoWrd is max input length */
  613.     smOldVerbSupport            = -311,                            /* param is added to old verbs to map to WSI verb*/
  614.     smSetKashidas                = -291,                            /* param is ON or OFF, old verb = -36*/
  615.     smSetKashProp                = -287,                            /* param is kashida proportion, old verb = -32*/
  616.     smScriptSysBase                = -281,                            /* param is associated font to use w/ system font (old verb = -26)*/
  617.     smScriptAppBase                = -283,                            /* param is associated font to use w/ app font (old verb = -28)*/
  618.     smScriptFntBase                = -285,                            /* param is associated font to use w/ all other fonts (old verb = -30)*/
  619.     smScriptLigatures            = -263,                            /* old verb = -8*/
  620.     smScriptNumbers                = -267                            /* old verb = -12*/
  621. };
  622.  
  623.  
  624. enum {
  625.                                                                 /* Special script code values for International Utilities */
  626.     iuSystemScript                = -1,                            /* <obsolete>  system script */
  627.     iuCurrentScript                = -2                            /* <obsolete>  current script (for font of grafPort) */
  628. };
  629.  
  630.  
  631. enum {
  632.                                                                 /* Negative verbs for KeyScript */
  633.     smKeyNextScript                = -1,                            /* Switch to next available script */
  634.     smKeySysScript                = -2,                            /* Switch to the system script */
  635.     smKeySwapScript                = -3,                            /* Switch to previously-used script */
  636.                                                                 /* New for System 7.0: */
  637.     smKeyNextKybd                = -4,                            /* Switch to next keyboard in current keyscript */
  638.     smKeySwapKybd                = -5,                            /* Switch to previously-used keyboard in current keyscript */
  639.     smKeyDisableKybds            = -6,                            /* Disable keyboards not in system or Roman script */
  640.     smKeyEnableKybds            = -7,                            /* Re-enable keyboards for all enabled scripts */
  641.     smKeyToggleInline            = -8,                            /* Toggle inline input for current keyscript */
  642.     smKeyToggleDirection        = -9,                            /* Toggle default line direction (TESysJust) */
  643.     smKeyNextInputMethod        = -10,                            /* Switch to next input method in current keyscript */
  644.     smKeySwapInputMethod        = -11,                            /* Switch to last-used input method in current keyscript */
  645.     smKeyDisableKybdSwitch        = -12,                            /* Disable switching from the current keyboard */
  646.     smKeySetDirLeftRight        = -15,                            /* Set default line dir to left-right, align left */
  647.     smKeySetDirRightLeft        = -16,                            /* Set default line dir to right-left, align right */
  648.     smKeyRoman                    = -17                            /* Set keyscript to Roman. Does nothing if Roman-only system, unlike KeyScript(smRoman) which forces an update to current default Roman keyboard */
  649. };
  650.  
  651.  
  652. enum {
  653.                                                                 /* Bits in the smScriptFlags word */
  654.                                                                 /*  (bits above 8 are non-static) */
  655.     smsfIntellCP                = 0,                            /*Script has intelligent cut & paste*/
  656.     smsfSingByte                = 1,                            /*Script has only single bytes*/
  657.     smsfNatCase                    = 2,                            /*Native chars have upper & lower case*/
  658.     smsfContext                    = 3,                            /*Script is contextual*/
  659.     smsfNoForceFont                = 4,                            /*Script will not force characters*/
  660.     smsfB0Digits                = 5,                            /*Script has alternate digits at B0-B9*/
  661.     smsfAutoInit                = 6,                            /*Auto initialize the script*/
  662.     smsfUnivExt                    = 7,                            /*Script is handled by universal extension*/
  663.     smsfSynchUnstyledTE            = 8,                            /*Script synchronizes for unstyled TE*/
  664.     smsfForms                    = 13,                            /*Uses contextual forms for letters*/
  665.     smsfLigatures                = 14,                            /*Uses contextual ligatures*/
  666.     smsfReverse                    = 15,                            /*Reverses native text, right-left*/
  667.                                                                 /* Bits in the smGenFlags long. */
  668.                                                                 /* First (high-order) byte is set from itlc flags byte. */
  669.     smfShowIcon                    = 31,                            /*Show icon even if only one script*/
  670.     smfDualCaret                = 30,                            /*Use dual caret for mixed direction text*/
  671.     smfNameTagEnab                = 29,                            /*Reserved for internal use*/
  672.     smfUseAssocFontInfo            = 28                            /*Use the associated font info for FontMetrics calls <48>*/
  673. };
  674.  
  675.  
  676. enum {
  677.                                                                 /* Roman script constants */
  678.                                                                 /* The following are here for backward compatibility, but should not be used. */
  679.                                                                 /* This information should be obtained using GetScript. */
  680.     romanSysFond                = 0x3FFF,                        /*system font id number*/
  681.     romanAppFond                = 3,                            /*application font id number*/
  682.     romanFlags                    = 0x0007,                        /*roman settings*/
  683.                                                                 /* Script Manager font equates. */
  684.     smFondStart                    = 0x4000,                        /*start from 16K*/
  685.     smFondEnd                    = 0xC000,                        /*past end of range at 48K*/
  686.                                                                 /* Miscellaneous font equates. */
  687.     smUprHalfCharSet            = 0x80                            /*first char code in top half of std char set*/
  688. };
  689.  
  690.  
  691. enum {
  692.                                                                 /* Character Set Extensions */
  693.     diaeresisUprY                = 0xD9,
  694.     fraction                    = 0xDA,
  695.     intlCurrency                = 0xDB,
  696.     leftSingGuillemet            = 0xDC,
  697.     rightSingGuillemet            = 0xDD,
  698.     fiLigature                    = 0xDE,
  699.     flLigature                    = 0xDF,
  700.     dblDagger                    = 0xE0,
  701.     centeredDot                    = 0xE1,
  702.     baseSingQuote                = 0xE2,
  703.     baseDblQuote                = 0xE3,
  704.     perThousand                    = 0xE4,
  705.     circumflexUprA                = 0xE5,
  706.     circumflexUprE                = 0xE6,
  707.     acuteUprA                    = 0xE7,
  708.     diaeresisUprE                = 0xE8,
  709.     graveUprE                    = 0xE9,
  710.     acuteUprI                    = 0xEA,
  711.     circumflexUprI                = 0xEB,
  712.     diaeresisUprI                = 0xEC,
  713.     graveUprI                    = 0xED,
  714.     acuteUprO                    = 0xEE,
  715.     circumflexUprO                = 0xEF,
  716.     appleLogo                    = 0xF0,
  717.     graveUprO                    = 0xF1,
  718.     acuteUprU                    = 0xF2,
  719.     circumflexUprU                = 0xF3,
  720.     graveUprU                    = 0xF4,
  721.     dotlessLwrI                    = 0xF5,
  722.     circumflex                    = 0xF6,
  723.     tilde                        = 0xF7,
  724.     macron                        = 0xF8,
  725.     breveMark                    = 0xF9,
  726.     overDot                        = 0xFA,
  727.     ringMark                    = 0xFB,
  728.     cedilla                        = 0xFC,
  729.     doubleAcute                    = 0xFD,
  730.     ogonek                        = 0xFE,
  731.     hachek                        = 0xFF
  732. };
  733.  
  734.  
  735. enum {
  736.                                                                 /* TokenType values */
  737.     tokenIntl                    = 4,                            /*the itl resource number of the tokenizer*/
  738.     tokenEmpty                    = -1                            /*used internally as an empty flag*/
  739. };
  740.  
  741.  
  742. enum {
  743.     tokenUnknown                = 0,                            /*chars that do not match a defined token type*/
  744.     tokenWhite                    = 1,                            /*white space*/
  745.     tokenLeftLit                = 2,                            /*literal begin*/
  746.     tokenRightLit                = 3,                            /*literal end*/
  747.     tokenAlpha                    = 4,                            /*alphabetic*/
  748.     tokenNumeric                = 5,                            /*numeric*/
  749.     tokenNewLine                = 6,                            /*new line*/
  750.     tokenLeftComment            = 7,                            /*open comment*/
  751.     tokenRightComment            = 8,                            /*close comment*/
  752.     tokenLiteral                = 9,                            /*literal*/
  753.     tokenEscape                    = 10,                            /*character escape (e.g. '\' in "\n", "\t")*/
  754.     tokenAltNum                    = 11,                            /*alternate number (e.g. $B0-B9 in Arabic,Hebrew)*/
  755.     tokenRealNum                = 12,                            /*real number*/
  756.     tokenAltReal                = 13,                            /*alternate real number*/
  757.     tokenReserve1                = 14,                            /*reserved*/
  758.     tokenReserve2                = 15,                            /*reserved*/
  759.     tokenLeftParen                = 16,                            /*open parenthesis*/
  760.     tokenRightParen                = 17,                            /*close parenthesis*/
  761.     tokenLeftBracket            = 18,                            /*open square bracket*/
  762.     tokenRightBracket            = 19                            /*close square bracket*/
  763. };
  764.  
  765.  
  766. enum {
  767.     tokenLeftCurly                = 20,                            /*open curly bracket*/
  768.     tokenRightCurly                = 21,                            /*close curly bracket*/
  769.     tokenLeftEnclose            = 22,                            /*open guillemet*/
  770.     tokenRightEnclose            = 23,                            /*close guillemet*/
  771.     tokenPlus                    = 24,
  772.     tokenMinus                    = 25,
  773.     tokenAsterisk                = 26,                            /*times/multiply*/
  774.     tokenDivide                    = 27,
  775.     tokenPlusMinus                = 28,                            /*plus or minus symbol*/
  776.     tokenSlash                    = 29,
  777.     tokenBackSlash                = 30,
  778.     tokenLess                    = 31,                            /*less than symbol*/
  779.     tokenGreat                    = 32,                            /*greater than symbol*/
  780.     tokenEqual                    = 33,
  781.     tokenLessEqual2                = 34,                            /*less than or equal, 2 characters (e.g. <=)*/
  782.     tokenLessEqual1                = 35,                            /*less than or equal, 1 character*/
  783.     tokenGreatEqual2            = 36,                            /*greater than or equal, 2 characters (e.g. >=)*/
  784.     tokenGreatEqual1            = 37,                            /*greater than or equal, 1 character*/
  785.     token2Equal                    = 38,                            /*double equal (e.g. ==)*/
  786.     tokenColonEqual                = 39                            /*colon equal*/
  787. };
  788.  
  789.  
  790. enum {
  791.     tokenNotEqual                = 40,                            /*not equal, 1 character*/
  792.     tokenLessGreat                = 41,                            /*less/greater, Pascal not equal (e.g. <>)*/
  793.     tokenExclamEqual            = 42,                            /*exclamation equal, C not equal (e.g. !=)*/
  794.     tokenExclam                    = 43,                            /*exclamation point*/
  795.     tokenTilde                    = 44,                            /*centered tilde*/
  796.     tokenComma                    = 45,
  797.     tokenPeriod                    = 46,
  798.     tokenLeft2Quote                = 47,                            /*open double quote*/
  799.     tokenRight2Quote            = 48,                            /*close double quote*/
  800.     tokenLeft1Quote                = 49,                            /*open single quote*/
  801.     tokenRight1Quote            = 50,                            /*close single quote*/
  802.     token2Quote                    = 51,                            /*double quote*/
  803.     token1Quote                    = 52,                            /*single quote*/
  804.     tokenSemicolon                = 53,
  805.     tokenPercent                = 54,
  806.     tokenCaret                    = 55,
  807.     tokenUnderline                = 56,
  808.     tokenAmpersand                = 57,
  809.     tokenAtSign                    = 58,
  810.     tokenBar                    = 59                            /*vertical bar*/
  811. };
  812.  
  813.  
  814. enum {
  815.     tokenQuestion                = 60,
  816.     tokenPi                        = 61,                            /*lower-case pi*/
  817.     tokenRoot                    = 62,                            /*square root symbol*/
  818.     tokenSigma                    = 63,                            /*capital sigma*/
  819.     tokenIntegral                = 64,                            /*integral sign*/
  820.     tokenMicro                    = 65,
  821.     tokenCapPi                    = 66,                            /*capital pi*/
  822.     tokenInfinity                = 67,
  823.     tokenColon                    = 68,
  824.     tokenHash                    = 69,                            /*e.g. #*/
  825.     tokenDollar                    = 70,
  826.     tokenNoBreakSpace            = 71,                            /*non-breaking space*/
  827.     tokenFraction                = 72,
  828.     tokenIntlCurrency            = 73,
  829.     tokenLeftSingGuillemet        = 74,
  830.     tokenRightSingGuillemet        = 75,
  831.     tokenPerThousand            = 76,
  832.     tokenEllipsis                = 77,
  833.     tokenCenterDot                = 78,
  834.     tokenNil                    = 127
  835. };
  836.  
  837.  
  838. enum {
  839.     delimPad                    = -2,                            /* obsolete, misspelled token names kept for backward compatibility */
  840.     tokenTilda                    = 44,
  841.     tokenCarat                    = 55
  842. };
  843.  
  844.  
  845. enum {
  846.                                                                 /* Table selectors for GetItlTable */
  847.     smWordSelectTable            = 0,                            /* get word select break table from 'itl2' */
  848.     smWordWrapTable                = 1,                            /* get word wrap break table from 'itl2' */
  849.     smNumberPartsTable            = 2,                            /* get default number parts table from 'itl4' */
  850.     smUnTokenTable                = 3,                            /* get unToken table from 'itl4' */
  851.     smWhiteSpaceList            = 4,                            /* get white space list from 'itl4' */
  852.     iuWordSelectTable            = 0,                            /* <obsolete>  get word select break table from 'itl2' */
  853.     iuWordWrapTable                = 1,                            /* <obsolete>  get word wrap break table from 'itl2' */
  854.     iuNumberPartsTable            = 2,                            /* <obsolete>  get default number parts table from 'itl4' */
  855.     iuUnTokenTable                = 3,                            /* <obsolete>  get unToken table from 'itl4' */
  856.     iuWhiteSpaceList            = 4                                /* <obsolete>  get white space list from 'itl4' */
  857. };
  858.  
  859. /* end of stuff moved from Packages.h */
  860.  
  861. enum {
  862.     tokenOK                        = 0,                            /* TokenResults */
  863.     tokenOverflow                = 1,                            /* TokenResults */
  864.     stringOverflow                = 2,                            /* TokenResults */
  865.     badDelim                    = 3,                            /* TokenResults */
  866.     badEnding                    = 4,                            /* TokenResults */
  867.     crash                        = 5                                /* TokenResults */
  868. };
  869.  
  870. typedef SInt8                             TokenResults;
  871. typedef char                             CharByteTable[256];
  872. typedef short                             TokenType;
  873. typedef TokenType                         DelimType[2];
  874. typedef TokenType                         CommentType[4];
  875. struct TokenRec {
  876.     TokenType                         theToken;
  877.     Ptr                             position;                    /*pointer into original source*/
  878.     long                             length;                        /*length of text in original source*/
  879.     StringPtr                         stringPosition;                /*Pascal/C string copy of identifier*/
  880. };
  881. typedef struct TokenRec TokenRec;
  882.  
  883. typedef TokenRec *                        TokenRecPtr;
  884. struct TokenBlock {
  885.     Ptr                             source;                        /*pointer to stream of characters*/
  886.     long                             sourceLength;                /*length of source stream*/
  887.     Ptr                             tokenList;                    /*pointer to array of tokens*/
  888.     long                             tokenLength;                /*maximum length of TokenList*/
  889.     long                             tokenCount;                    /*number tokens generated by tokenizer*/
  890.     Ptr                             stringList;                    /*pointer to stream of identifiers*/
  891.     long                             stringLength;                /*length of string list*/
  892.     long                             stringCount;                /*number of bytes currently used*/
  893.     Boolean                         doString;                    /*make strings & put into StringList*/
  894.     Boolean                         doAppend;                    /*append to TokenList rather than replace*/
  895.     Boolean                         doAlphanumeric;                /*identifiers may include numeric*/
  896.     Boolean                         doNest;                        /*do comments nest?*/
  897.     TokenType                         leftDelims[2];
  898.     TokenType                         rightDelims[2];
  899.     TokenType                         leftComment[4];
  900.     TokenType                         rightComment[4];
  901.     TokenType                         escapeCode;                    /*escape symbol code*/
  902.     TokenType                         decimalCode;
  903.     Handle                             itlResource;                /*handle to itl4 resource of current script*/
  904.     long                             reserved[8];                /*must be zero!*/
  905. };
  906. typedef struct TokenBlock TokenBlock;
  907.  
  908. typedef TokenBlock *                    TokenBlockPtr;
  909. EXTERN_API( short )
  910. GetSysDirection                    (void)                                                        TWOWORDINLINE(0x3EB8, 0x0BAC);
  911.  
  912. EXTERN_API( void )
  913. SetSysDirection                    (short                     value)                                TWOWORDINLINE(0x31DF, 0x0BAC);
  914.  
  915. EXTERN_API( short )
  916. FontScript                        (void)                                                        FOURWORDINLINE(0x2F3C, 0x8200, 0x0000, 0xA8B5);
  917.  
  918. EXTERN_API( short )
  919. IntlScript                        (void)                                                        FOURWORDINLINE(0x2F3C, 0x8200, 0x0002, 0xA8B5);
  920.  
  921. EXTERN_API( void )
  922. KeyScript                        (short                     code)                                FOURWORDINLINE(0x2F3C, 0x8002, 0x0004, 0xA8B5);
  923.  
  924. EXTERN_API( Boolean )
  925. IsCmdChar                        (const EventRecord *    event,
  926.                                  short                     test)                                FOURWORDINLINE(0x2F3C, 0x8206, 0xFFD0, 0xA8B5);
  927.  
  928. EXTERN_API( short )
  929. FontToScript                    (short                     fontNumber)                            FOURWORDINLINE(0x2F3C, 0x8202, 0x0006, 0xA8B5);
  930.  
  931. EXTERN_API( long )
  932. GetScriptManagerVariable        (short                     selector)                            FOURWORDINLINE(0x2F3C, 0x8402, 0x0008, 0xA8B5);
  933.  
  934. EXTERN_API( OSErr )
  935. SetScriptManagerVariable        (short                     selector,
  936.                                  long                     param)                                FOURWORDINLINE(0x2F3C, 0x8206, 0x000A, 0xA8B5);
  937.  
  938. EXTERN_API( long )
  939. GetScriptVariable                (short                     script,
  940.                                  short                     selector)                            FOURWORDINLINE(0x2F3C, 0x8404, 0x000C, 0xA8B5);
  941.  
  942. EXTERN_API( OSErr )
  943. SetScriptVariable                (short                     script,
  944.                                  short                     selector,
  945.                                  long                     param)                                FOURWORDINLINE(0x2F3C, 0x8208, 0x000E, 0xA8B5);
  946.  
  947. EXTERN_API( short )
  948. CharacterByteType                (Ptr                     textBuf,
  949.                                  short                     textOffset,
  950.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC206, 0x0010, 0xA8B5);
  951.  
  952. EXTERN_API( short )
  953. CharacterType                    (Ptr                     textBuf,
  954.                                  short                     textOffset,
  955.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC206, 0x0012, 0xA8B5);
  956.  
  957. EXTERN_API( OSErr )
  958. TransliterateText                (Handle                 srcHandle,
  959.                                  Handle                 dstHandle,
  960.                                  short                     target,
  961.                                  long                     srcMask,
  962.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC20E, 0x0018, 0xA8B5);
  963.  
  964. EXTERN_API( Boolean )
  965. FillParseTable                    (CharByteTable             table,
  966.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC204, 0x0022, 0xA8B5);
  967.  
  968. EXTERN_API( Handle )
  969. GetIntlResource                    (short                     theID)                                THREEWORDINLINE(0x3F3C, 0x0006, 0xA9ED);
  970.  
  971. EXTERN_API( void )
  972. ClearIntlResourceCache            (void)                                                        THREEWORDINLINE(0x3F3C, 0x0018, 0xA9ED);
  973.  
  974. EXTERN_API( void )
  975. GetIntlResourceTable            (ScriptCode             script,
  976.                                  short                     tableCode,
  977.                                  Handle *                itlHandle,
  978.                                  long *                    offset,
  979.                                  long *                    length)                                THREEWORDINLINE(0x3F3C, 0x0024, 0xA9ED);
  980.  
  981. EXTERN_API( UniversalProcPtr )
  982. GetScriptUtilityAddress            (short                     selector,
  983.                                  Boolean                 Before,
  984.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC404, 0x0038, 0xA8B5);
  985.  
  986. EXTERN_API( void )
  987. SetScriptUtilityAddress            (short                     selector,
  988.                                  Boolean                 Before,
  989.                                  UniversalProcPtr         routineAddr,
  990.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC008, 0x003A, 0xA8B5);
  991.  
  992. EXTERN_API( UniversalProcPtr )
  993. GetScriptQDPatchAddress            (short                     trapNum,
  994.                                  Boolean                 Before,
  995.                                  Boolean                 forPrinting,
  996.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC406, 0x003C, 0xA8B5);
  997.  
  998. EXTERN_API( void )
  999. SetScriptQDPatchAddress            (short                     trapNum,
  1000.                                  Boolean                 Before,
  1001.                                  Boolean                 forPrinting,
  1002.                                  UniversalProcPtr         routineAddr,
  1003.                                  ScriptCode             script)                                FOURWORDINLINE(0x2F3C, 0xC00A, 0x003E, 0xA8B5);
  1004.  
  1005. EXTERN_API( void )
  1006. SetIntlResource                    (short                     refNum,
  1007.                                  short                     theID,
  1008.                                  Handle                 intlHandle)                            THREEWORDINLINE(0x3F3C, 0x0008, 0xA9ED);
  1009.  
  1010. EXTERN_API( short )
  1011. CharByte                        (Ptr                     textBuf,
  1012.                                  short                     textOffset)                            FOURWORDINLINE(0x2F3C, 0x8206, 0x0010, 0xA8B5);
  1013.  
  1014. EXTERN_API( short )
  1015. CharType                        (Ptr                     textBuf,
  1016.                                  short                     textOffset)                            FOURWORDINLINE(0x2F3C, 0x8206, 0x0012, 0xA8B5);
  1017.  
  1018. EXTERN_API( OSErr )
  1019. Transliterate                    (Handle                 srcHandle,
  1020.                                  Handle                 dstHandle,
  1021.                                  short                     target,
  1022.                                  long                     srcMask)                            FOURWORDINLINE(0x2F3C, 0x820E, 0x0018, 0xA8B5);
  1023.  
  1024. EXTERN_API( Boolean )
  1025. ParseTable                        (CharByteTable             table)                                FOURWORDINLINE(0x2F3C, 0x8204, 0x0022, 0xA8B5);
  1026.  
  1027. EXTERN_API( TokenResults )
  1028. IntlTokenize                    (TokenBlockPtr             tokenParam)                            FOURWORDINLINE(0x2F3C, 0x8204, 0xFFFA, 0xA8B5);
  1029.  
  1030. #if OLDROUTINENAMES
  1031. #define SetSysJust(newJust) SetSysDirection(newJust)
  1032. #define GetSysJust() GetSysDirection()
  1033. #define Font2Script(fontNumber) FontToScript(fontNumber)
  1034. #define GetEnvirons(verb) GetScriptManagerVariable(verb)
  1035. #define SetEnvirons(verb, param) SetScriptManagerVariable(verb, param)
  1036. #define GetScript(script, verb) GetScriptVariable(script, verb)
  1037. #define SetScript(script, verb, param) SetScriptVariable(script, verb, param)
  1038. #define IUGetIntl(theID) GetIntlResource(theID) 
  1039. #define IUSetIntl(refNum, theID, intlHandle) SetIntlResource(refNum, theID, intlHandle)
  1040. #define IUClearCache() ClearIntlResourceCache()
  1041. #define IUGetItlTable(script, tableCode, itlHandle, offset, length) \
  1042.          GetIntlResourceTable(script, tableCode, itlHandle, offset, length)
  1043. #endif  /* OLDROUTINENAMES */
  1044.  
  1045.  
  1046.  
  1047.  
  1048. #if PRAGMA_STRUCT_ALIGN
  1049.     #pragma options align=reset
  1050. #elif PRAGMA_STRUCT_PACKPUSH
  1051.     #pragma pack(pop)
  1052. #elif PRAGMA_STRUCT_PACK
  1053.     #pragma pack()
  1054. #endif
  1055.  
  1056. #ifdef PRAGMA_IMPORT_OFF
  1057. #pragma import off
  1058. #elif PRAGMA_IMPORT
  1059. #pragma import reset
  1060. #endif
  1061.  
  1062. #ifdef __cplusplus
  1063. }
  1064. #endif
  1065.  
  1066. #endif /* __SCRIPT__ */
  1067.  
  1068.